package com.zzg.test2

import android.app.Application
import android.webkit.WebView
import com.zzg.test2.manager.CacheWebLoadManager
import com.zzg.test2.web.manage.WebViewPreloader


class ZApplication : Application() {

    override fun onCreate() {
        super.onCreate()
        WebView.setWebContentsDebuggingEnabled(true);
        CacheWebLoadManager.getInstance()

    }

    override fun onLowMemory() {
        super.onLowMemory()
        WebViewPreloader.release()
    }

    override fun onTrimMemory(level: Int) {
        super.onTrimMemory(level)
        if (level >= TRIM_MEMORY_COMPLETE) {
            WebViewPreloader.release()
        }
    }
}